#include <iostream>
#include <list>
#include <deque>
using namespace std;
template <typename Container>
void display(Container & con){
    for(auto & elem : con){
        cout << elem << " ";
    }
    cout << endl;
}
void test(){
   list<int> ls = { 3,5,8,53,21,45,67,89,54 };
   deque<int> even;
   deque<int> odd;
   for(auto it = ls.begin();it != ls.end();++it){
       if(*it %2 == 1){
           odd.push_back(*it);
       }
       else{
           even.push_back(*it);
       }
   }
   cout <<"偶数" << endl;
   display(even);
   cout << "奇数" << endl;
   display(odd);
}
int main()
{
    test();
    return 0;
}

